Skip to content

schema: support multiple images destinations#4038

Merged
jlebon merged 4 commits intocoreos:mainfrom
jbtrystram:schema-multi-images
Mar 27, 2025
Merged

schema: support multiple images destinations#4038
jlebon merged 4 commits intocoreos:mainfrom
jbtrystram:schema-multi-images

Conversation

@jbtrystram
Copy link
Copy Markdown
Member

In coreos/fedora-coreos-pipeline#1091 we added the possibility of publishing container images to multiples repositories.

This needs to be reflected in the schema otherwhise we only record one image (currenlty the last pushed).

Add a primary-image key that extends image by adding an additional-images array.

Use that for relevant container images objects.

See coreos/fedora-coreos-pipeline#1099

jbtrystram added a commit to jbtrystram/coreos-assembler that referenced this pull request Mar 11, 2025
in coreos/fedora-coreos-pipeline#1091 we started
publishing container images in multiples repos.
However the build.json was not reflecting that, only storing the last
pushed image data, overwriting it with each arch.

See coreos#4038
See coreos/fedora-coreos-pipeline#1099
jbtrystram added a commit to jbtrystram/coreos-assembler that referenced this pull request Mar 14, 2025
in coreos/fedora-coreos-pipeline#1091 we started
publishing container images in multiples repos.
However the build.json was not reflecting that, only storing the last
pushed image data, overwriting it with each arch.

See coreos#4038
See coreos/fedora-coreos-pipeline#1099
@jbtrystram jbtrystram force-pushed the schema-multi-images branch from 037b948 to 6a620fb Compare March 14, 2025 16:50
@jbtrystram
Copy link
Copy Markdown
Member Author

jbtrystram commented Mar 14, 2025

Ok just tested that, pushing a couple of manifests on a testing repo :

jq '."base-oscontainer"' < builds/latest/x86_64/meta.json                                                                                
{
  "image": "quay.io/jbtrystramtestimages/testrepo1",
  "digest": "sha256:4d20a109cba763ca01d2ffa8c72b3e5f4038a619d50f54946836489499eeaf89",
  "tags": [
    "stable"
  ],
  "additional-images": [
    {
      "image": "quay.io/jbtrystramtestimages/testrepo2",
      "digest": "sha256:4d20a109cba763ca01d2ffa8c72b3e5f4038a619d50f54946836489499eeaf89",
      "tags": [
        "stable"
      ]
    },
    {
      "image": "quay.io/jbtrystramtestimages/fcos",
      "digest": "sha256:4d20a109cba763ca01d2ffa8c72b3e5f4038a619d50f54946836489499eeaf89",
      "tags": [
        "stable"
      ]
    }
  ]
}

jbtrystram added a commit to jbtrystram/coreos-assembler that referenced this pull request Mar 14, 2025
in coreos/fedora-coreos-pipeline#1091 we started
publishing container images in multiples repos.
However the build.json was not reflecting that, only storing the last
pushed image data, overwriting it with each arch.

See coreos#4038
See coreos/fedora-coreos-pipeline#1099
@jbtrystram jbtrystram force-pushed the schema-multi-images branch from 6a620fb to 69262ba Compare March 14, 2025 17:11
Comment thread src/cmd-push-container-manifest Outdated
jbtrystram added a commit to jbtrystram/coreos-assembler that referenced this pull request Mar 14, 2025
in coreos/fedora-coreos-pipeline#1091 we started
publishing container images in multiples repos.
However the build.json was not reflecting that, only storing the last
pushed image data, overwriting it with each arch.

See coreos#4038
See coreos/fedora-coreos-pipeline#1099
@jbtrystram jbtrystram force-pushed the schema-multi-images branch from 69262ba to 7b93e72 Compare March 14, 2025 17:34
Copy link
Copy Markdown
Member

@jlebon jlebon left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Needs a make schema-update. LGTM otherwise!

Comment thread src/cmd-push-container-manifest Outdated
jbtrystram added a commit to jbtrystram/coreos-assembler that referenced this pull request Mar 17, 2025
in coreos/fedora-coreos-pipeline#1091 we started
publishing container images in multiples repos.
However the build.json was not reflecting that, only storing the last
pushed image data, overwriting it with each arch.

See coreos#4038
See coreos/fedora-coreos-pipeline#1099
@jbtrystram jbtrystram force-pushed the schema-multi-images branch from 7b93e72 to ca4beba Compare March 17, 2025 10:21
jbtrystram added a commit to jbtrystram/coreos-assembler that referenced this pull request Mar 17, 2025
in coreos/fedora-coreos-pipeline#1091 we started
publishing container images in multiples repos.
However the build.json was not reflecting that, only storing the last
pushed image data, overwriting it with each arch.

See coreos#4038
See coreos/fedora-coreos-pipeline#1099
@jbtrystram jbtrystram force-pushed the schema-multi-images branch from ca4beba to d99eb2f Compare March 17, 2025 10:23
@jbtrystram
Copy link
Copy Markdown
Member Author

Needs a make schema-update. LGTM otherwise!

i am hitting #4043

ravanelli
ravanelli previously approved these changes Mar 17, 2025
Copy link
Copy Markdown
Member

@ravanelli ravanelli left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Copy link
Copy Markdown
Member

@ravanelli ravanelli left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would change the commit message:

Note that I had to force the update for entries in `go.sum` as the checksums had
changed. Fixes https://github.com/coreos/coreos-assembler/issues/4043.

@jbtrystram jbtrystram force-pushed the schema-multi-images branch from 257809d to b33dc1f Compare March 17, 2025 14:30
jbtrystram added a commit to jbtrystram/coreos-assembler that referenced this pull request Mar 17, 2025
in coreos/fedora-coreos-pipeline#1091 we started
publishing container images in multiples repos.
However the build.json was not reflecting that, only storing the last
pushed image data, overwriting it with each arch.

See coreos#4038
See coreos/fedora-coreos-pipeline#1099
@jbtrystram jbtrystram force-pushed the schema-multi-images branch 2 times, most recently from e173c7d to c61bd56 Compare March 19, 2025 15:00
jbtrystram added a commit to jbtrystram/coreos-assembler that referenced this pull request Mar 20, 2025
in coreos/fedora-coreos-pipeline#1091 we started
publishing container images in multiples repos.
However the build.json was not reflecting that, only storing the last
pushed image data, overwriting it with each arch.

See coreos#4038
See coreos/fedora-coreos-pipeline#1099
@jbtrystram jbtrystram force-pushed the schema-multi-images branch from c61bd56 to 117ba69 Compare March 20, 2025 07:57
@jbtrystram
Copy link
Copy Markdown
Member Author

The test failure have nothing to do with this change

/override ci/prow/rhcos

@openshift-ci
Copy link
Copy Markdown

openshift-ci Bot commented Mar 24, 2025

@jbtrystram: Overrode contexts on behalf of jbtrystram: ci/prow/rhcos

Details

In response to this:

The test failure have nothing to do with this change

/override ci/prow/rhcos

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.

Copy link
Copy Markdown
Member

@jlebon jlebon left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You should be able to test the GC parts using --dry-run.

Comment thread src/cmd-coreos-prune Outdated
jbtrystram added a commit to jbtrystram/coreos-assembler that referenced this pull request Mar 26, 2025
in coreos/fedora-coreos-pipeline#1091 we started
publishing container images in multiples repos.
However the build.json was not reflecting that, only storing the last
pushed image data, overwriting it with each arch.

See coreos#4038
See coreos/fedora-coreos-pipeline#1099
@jbtrystram jbtrystram force-pushed the schema-multi-images branch from 117ba69 to 4c900b8 Compare March 26, 2025 14:56
@jbtrystram
Copy link
Copy Markdown
Member Author

jbtrystram commented Mar 26, 2025

I just duplicated the quay image in the latest rawhide meta.json and ran a dry-run , and the prune script was happy :

 "base-oscontainer": {
    ┊ ┊ "image": "quay.io/fedora/fedora-coreos",
    ┊ ┊ "digest": "sha256:b12c0ffaae46fb2e4ee5873a2ef3b67eba4a3007e947845bdcf4fc2e70fc71d8",
    ┊ ┊ "tags": ["testing", "41.20250315.2.0"],
    ┊ ┊ "additional_images": [
    ┊ ┊ ┊ {
    ┊ ┊ ┊ ┊ "image": "quay.io/fedora/fedora-coreos",
    ┊ ┊ ┊ ┊ "digest": "sha256:b12c0ffaae46fb2e4ee5873a2ef3b67eba4a3007e947845bdcf4fc2e70fc71d8",
    ┊ ┊ ┊ ┊ "tags": ["testing", "41.20250315.2.0"]
    ┊ ┊ ┊ }
    ┊ ┊ ]
    ┊ }

@jbtrystram jbtrystram force-pushed the schema-multi-images branch 2 times, most recently from b88df6c to 54813ce Compare March 26, 2025 16:33
In coreos/fedora-coreos-pipeline#1091 we added
the possibility of publishing container images to multiples repositories.

This needs to be reflected in the schema otherwhise we only record one
image (currenlty the last pushed).

Add a `primary-image` key that extends image by adding an `additional-images`
array.

Use that for relevant container images objects.

See coreos/fedora-coreos-pipeline#1099
in coreos/fedora-coreos-pipeline#1091 we started
publishing container images in multiples repos.
However the build.json was not reflecting that, only storing the last
pushed image data, overwriting it with each arch.

See coreos#4038
See coreos/fedora-coreos-pipeline#1099
In fb222e2 we introduced additionnal
images in the schema, update the generated go code to match.
@jbtrystram jbtrystram force-pushed the schema-multi-images branch from 54813ce to 1e8ac91 Compare March 27, 2025 09:46
@jbtrystram
Copy link
Copy Markdown
Member Author

/retest

Copy link
Copy Markdown
Member

@jlebon jlebon left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice work!

@jlebon jlebon enabled auto-merge (rebase) March 27, 2025 13:40
@jlebon
Copy link
Copy Markdown
Member

jlebon commented Mar 27, 2025

Prow CI failure here is unrelated.

/override ci/prow/rhcos

@openshift-ci
Copy link
Copy Markdown

openshift-ci Bot commented Mar 27, 2025

@jlebon: Overrode contexts on behalf of jlebon: ci/prow/rhcos

Details

In response to this:

Prow CI failure here is unrelated.

/override ci/prow/rhcos

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.

@jlebon jlebon merged commit 4c2afc4 into coreos:main Mar 27, 2025
5 checks passed
jlebon pushed a commit that referenced this pull request Mar 27, 2025
in coreos/fedora-coreos-pipeline#1091 we started
publishing container images in multiples repos.
However the build.json was not reflecting that, only storing the last
pushed image data, overwriting it with each arch.

See #4038
See coreos/fedora-coreos-pipeline#1099
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants